package com.example.demo.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

import java.util.Map;

@Component
@ConfigurationProperties(prefix = "student")
@Data
public class Stu {
    private Integer id;
    private Integer age;
    private String name;
}

@Component
@ConfigurationProperties(prefix = "student1")
@Data
class  StuMap1{
    private Map<String,String> stumap;
}


@Component
@ConfigurationProperties(prefix = "student1.stumap")
@Data
class  StuMap2{
    private Integer id;

}
